package com.xaicode.locker.JavaSJMS.three.StructureMode.Decorator;

/**
 * 装饰器
 * Decorator 是个油漆工,给你的东东的外表刷上美丽的颜色.
 * @author Locker
 * 	  <br> 2017年5月2日 下午12:22:07
 * @version v1.0
 */
public class Decorator implements Sourceable {

	// 持有被装饰对象实例
	private Sourceable sourceable;
	
	public Decorator(){}
	
	public Decorator(Sourceable sourceable){
		super();
		this.sourceable = sourceable;
	}
	
	public void method() {
		System.out.println("-- before class Decorator implements Sourceable method()");
		sourceable.method();
		System.out.println("-- after class Decorator implements Sourceable method()");
	}

}
